home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 11
/
CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso
/
cucd
/
graphics
/
mpimage
/
sc
/
sprintf.c
Wrap
C/C++ Source or Header
|
1995-07-05
|
1KB
|
38 lines
/* mpaddock@cix.compulink.co.uk */
/* mark@topic.demon.co.uk */
/* sprintf() using RawDoFmt() */
#define __USE_SYSBASE 1
#ifdef __GNUC__
#include <inline/exec.h>
#else
#include <proto/exec.h>
#endif
#include <stdarg.h>
/*#include <stdio.h> */
int sprintf(char *buffer,char *ctl, ...)
{
va_list args;
va_start(args, ctl);
/*********************************************************/
/* NOTE: The string below is actually CODE that copies a */
/* value from d0 to A3 and increments A3: */
/* */
/* move.b d0,(a3)+ */
/* rts */
/* */
/* It is essentially the callback routine needed */
/* by RawDoFmt. */
/*********************************************************/
RawDoFmt(ctl, args, (void (*))"\x16\xc0\x4e\x75", buffer);
va_end(args);
return 0;
}